<?php
namespace API\Controller;
use Think\Controller;
class ManageuserController extends CommonController {
	//载入商城用户信息 
	// true表示载入成功 false失败
	//标识码 0表示失败 1表示成功
	public function loaduser(){
		$User = M('User');
		$Userdata = $User->order("id desc")->select();

		if (empty($Userdata)) {
		             $this->response("载入商城用户信息",false,0,"商城用户信息为空");	
		}else{
			$Userlist = array();
			foreach ($Userdata as $value) {
				if (empty($value['openid'])) {
					$value['headimg'] = json_decode($value['headimg'],true);
					$value['headimg'] = $value['headimg'][0];
				}
				$Userlist[] = $value;
			}
			$this->response("载入商城用户信息",true,1,$Userlist);
		}
	}
}